From fdcf726e9d8128f90cf180116fd9cb084548abea Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 5 Apr 2007 18:12:21 +0100 Subject: [PATCH] [HVM] Save/restore: qemu-dm should calculate bitmap size from maximum gpfn like xc_save does. Signed-off-by: Tim Deegan --- tools/ioemu/xenstore.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/ioemu/xenstore.c b/tools/ioemu/xenstore.c index e04a74236c..35484bbc90 100644 --- a/tools/ioemu/xenstore.c +++ b/tools/ioemu/xenstore.c @@ -248,12 +248,8 @@ void xenstore_process_logdirty_event(void) key = (key_t) strtoull(key_terminated, NULL, 16); /* Figure out how bit the log-dirty bitmaps are */ - logdirty_bitmap_size = ((phys_ram_size + 0x20 - - (vga_ram_size + bios_size)) - >> (TARGET_PAGE_BITS)); /* nr of bits in map*/ - if (logdirty_bitmap_size > HVM_BELOW_4G_MMIO_START >> TARGET_PAGE_BITS) - logdirty_bitmap_size += - HVM_BELOW_4G_MMIO_LENGTH >> TARGET_PAGE_BITS; /* still bits */ + logdirty_bitmap_size = xc_memory_op(xc_handle, + XENMEM_maximum_gpfn, &domid) + 1; logdirty_bitmap_size = ((logdirty_bitmap_size + HOST_LONG_BITS - 1) / HOST_LONG_BITS); /* longs */ logdirty_bitmap_size *= sizeof (unsigned long); /* bytes */ -- 2.30.2